package com.baibei.gateway.zuul;

import com.baibei.gateway.zuul.filter.PostFilter;
import com.baibei.gateway.zuul.filter.PreFilter;
import com.baibei.gateway.zuul.filter.RoutingFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;

/**
 * @author: Dreyer
 * @date: 2017/2/20 11:17
 * @description:
 */
@SpringCloudApplication
@EnableZuulProxy
public class GateWayZuulApplication {

    public static void main(String[] args) {
        SpringApplication.run(GateWayZuulApplication.class, args);

    }


    @Bean
    public PreFilter preFilter() {
        return new PreFilter();
    }

    @Bean
    public RoutingFilter routingFilter() {
        return new RoutingFilter();
    }

    @Bean
    public PostFilter postFilter() {
        return new PostFilter();
    }
}